package cn.sdack.go.users.dao;

import cn.sdack.go.common.entities.users.RoleAuthorityEntity;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @author sdack
 * @date 2024/1/8
 */
public interface RoleAuthorityDao extends JpaRepository<RoleAuthorityEntity,Long> {

    List<RoleAuthorityEntity> findAllByGidAndRoleCodeAndDelIsNull(long gid,String roleCode);

    List<RoleAuthorityEntity> findAllByGidAndAuthorityCodeAndDelIsNull(long gid,String authorityCode);

    List<RoleAuthorityEntity> findAllByGidAndRoleCodeInAndDelIsNull(long gid,List<String> roleCode);

}
